package com.yxzz.core.service.impl;

import com.yxzz.core.domain.PTherapyRecord;
import com.yxzz.core.mapper.PTherapyRecordMapper;
import com.yxzz.core.service.IPTherapyRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 中医治疗手法记录Service业务层处理
 *
 * @author ruoyi
 * @date 2023-02-28
 */
@Service
public class PTherapyRecordServiceImpl implements IPTherapyRecordService
{
    @Autowired
    private PTherapyRecordMapper pTherapyRecordMapper;

    /**
     * 查询中医治疗手法记录
     *
     * @param id 中医治疗手法记录主键
     * @return 中医治疗手法记录
     */
    @Override
    public PTherapyRecord selectPTherapyRecordById(Long id)
    {
        return pTherapyRecordMapper.selectPTherapyRecordById(id);
    }


    /**
     * 查询中医治疗手法记录列表
     *
     * @param pTherapyRecord 中医治疗手法记录
     * @return 中医治疗手法记录
     */
    @Override
    public List<PTherapyRecord> selectPTherapyRecordList(PTherapyRecord pTherapyRecord)
    {
        return pTherapyRecordMapper.selectPTherapyRecordList(pTherapyRecord);
    }

    /**
     * 新增中医治疗手法记录
     *
     * @param pTherapyRecord 中医治疗手法记录
     * @return 结果
     */
    @Override
    public int insertPTherapyRecord(PTherapyRecord pTherapyRecord)
    {
        return pTherapyRecordMapper.insertPTherapyRecord(pTherapyRecord);
    }

    /**
     * 修改中医治疗手法记录
     *
     * @param pTherapyRecord 中医治疗手法记录
     * @return 结果
     */
    @Override
    public int updatePTherapyRecord(PTherapyRecord pTherapyRecord)
    {
        return pTherapyRecordMapper.updatePTherapyRecord(pTherapyRecord);
    }

    /**
     * 批量删除中医治疗手法记录
     *
     * @param ids 需要删除的中医治疗手法记录主键
     * @return 结果
     */
    @Override
    public int deletePTherapyRecordByIds(Long[] ids)
    {
        return pTherapyRecordMapper.deletePTherapyRecordByIds(ids);
    }

    /**
     * 删除中医治疗手法记录信息
     *
     * @param id 中医治疗手法记录主键
     * @return 结果
     */
    @Override
    public int deletePTherapyRecordById(Long id)
    {
        return pTherapyRecordMapper.deletePTherapyRecordById(id);
    }
}
